Repository navigation
fix: always attempt to resolve identity-hash & certificate-name - #458
Open
Bug-Reaper wants to merge 2 commits into
Open
Bug-Reaper wants to merge 2 commits into
Bug-Reaper wants to merge 2 commits into
Conversation
We need both for different edge-cases that can also overlap. For that reason we do this even if validation is turned off. If validation is off, an unresolved identity-part will still be as-is to `new Identity(opts.identity <RawInputString>)` & this preserves older behavior. More info here electron#452
…y find-identity` Now that we allow `security find-identity` w/o `-v` we must accomodate for a result which will contain all valid identities twice.
Author
|
It didn't look like As mention in discussion elsewhere, since we now run Here's an example log of the differing outputs of `security find-identity`Added a second commit to keep a |
This was referenced Oct 4, 2026
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Original issue : #452
Improvement on : #454
Change Context
An incoming identity string will be either a certificate-name OR the identity-hash for a certificate. Technically the
codesignbinary we're wrapping allows for either.Certain edge-cases require us to have the identity-hash to correctly invoke
codesign. Other flows require us to have the certificate-name for automatic plist entitlement management done by osx-sign.The above edge-cases can also overlap and occur at the same-time in certain build scenarios.
For those reasons, this PR adds code to always try and extrapolate the full certificate-name & identity-hash pair from whatever identity-part is being passed in as
opts.identity.Even when calling with
opts.identityValidation=falsewe still attempt to find the full pair of identity info. In the spirit ofidentityValidation=falsethis includes expired/untrusted identities. If the full-pair of identity cannot be resolved andidentityValidation=falsethen we return anew Identity()and just pass it the identity-part we have fromopts.identity.So we still attempt to create a full identity-hash & certificate-name pair with validation off, but we do not block a user from running a half-baked identity if we cannot resolve the full-pair.
CC @mmaietta